#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    QString Source = QApplication::clipboard()->text();
#ifdef Q_OS_MACOS
    Source = Source.replace("-\r"," ");
    Source = Source.replace("\r"," ");
#endif
#ifdef Q_OS_WIN
    Source = Source.replace("-\r\n"," ");
    Source = Source.replace("\r\n"," ");
#endif
#ifdef Q_OS_LINUX
    Source = Source.replace("-\n"," ");
    Source = Source.replace("\n"," ");
#endif
    QApplication::clipboard()->setText(Source);
}
